#ifndef ADMINMAINWINDOW_H
#define ADMINMAINWINDOW_H

#include <QMainWindow>
#include "adminaddemployeeview.h"
#include "adminleaveemployeeview.h"
#include "adminselectemployeeview.h"
#include "departmentview.h"
#include "monthassessmentview.h"
#include "monthsalaryview.h"
#include "daycheckview.h"
#include "departmentchangeview.h"
#include "leaverecordview.h"
#include "adminmanager.h"

class AdminMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit AdminMainWindow(QWidget *parent = nullptr);
    ~AdminMainWindow();
    void setAdminManager(AdminManager *manager);

private slots:
    void onAddEmployee();
    void onSelectEmployee();
    void onLeaveEmployee();
    void onDepartmentManagement();
    void onAssessmentManagement();
    void onSalaryManagement();
    void onAttendanceManagement();
    void onDepartmentChangeManagement();
    void onLogout();
    void onBackToMain();

private:
    void setupUI();
    void setupMenus();
    void setupToolbars();
    void setupConnections();

    // 视图组件
    AdminAddEmployeeView *addEmployeeView;
    AdminSelectEmployeeView *selectEmployeeView;
    AdminLeaveEmployeeView *leaveEmployeeView;
    DepartmentView *departmentView;
    MonthAssessmentView *assessmentView;
    MonthSalaryView *salaryView;
    DayCheckView *attendanceView;
    DepartmentChangeView *departmentChangeView;
    LeaveRecordView *leaveRecordView;

    // 管理员管理器
    AdminManager *m_adminManager;

private slots:
    void onLeaveRecordManagement();
};

#endif // ADMINMAINWINDOW_H
